<template>
    <div >
<div v-for="(item,index) in complete" :key="index" class="conts">
    <div class="commodity">
        <span>{{item.cusName}}</span>
        <a href="#">&gt;</a>
    </div>
          <van-card
               :desc="`下单时间：`+item.orderTime"
               :title="item.cusName"
               thumb="https://img01.yzcdn.cn/vant/ipad.jpeg">
                  <template #tags class="commoditys">
                    <van-tag plain type="danger">下单人：</van-tag>
                    <van-tag plain type="danger">{{item.orderUserName}}</van-tag>
                  </template>
                  <template #footer>
                    <van-button size="mini" @click="shipmentsClick(item.serialNo)" >发货</van-button>
                  </template>
                </van-card>
   </div>
   <router-view></router-view>
   <van-empty description="描述文字" v-show="!complete.length" />
    </div>
</template>

<script>
import {GetGoodsGoods} from '@/raxios/api'
export default {
    data () {
        return {
            value:'',
            complete:[],
            
 
        }
    },
    created(){
    GetGoodsGoods({current:'1',size:'10',keyword:''}).then(res=>{
        this.complete=res.data.records
        // console.log(complete);
        // console.log(res.data.records);
    })
 },
 methods:{
     shipmentsClick(val){
      this.$router.push("/customer?serialNo=" + val);
      this.serialNo=val;
      console.log(this.serialNo);
     }
 }
}
</script>
 
<style lang = "less" scoped>
   .commodity{
        height: 0.3rem;
        border-bottom: 1px solid #ccc;
        line-height: 0.3rem;
        background-color: #fff;
        display: flex;
        justify-content: space-between;
        padding: .2rem;
        font-size: 0.14rem;}
.conts{
    margin-bottom: 0.1rem;
}
    .van-card__header{
        border-bottom: 1px solid #ccc;
    }
    /deep/.van-tag--plain::before{
        border: none;
    }
    .van-tag{
    color: #646566;
    }
    /deep/.van-button{
        padding: 0.15rem;
        margin-top: 0.1rem;
        background-color: #003399;
        border-radius: 0.2rem;
        color: #fff;
        width: 0.72rem;
    }
    .van-card:not(:first-child) {
        margin: 0;
    }
    .van-card{
        background-color: #fff;
    }
     
</style>